<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
</head>
<body>
    <button class="btn1">发送ajax请求1</button>
    <button class="btn2">发送ajax请求2</button>
    <script>
        $('.btn1').on("click",function (){

            $.get("/getdata",{name:"hwh",age:18},function (res){
                
                console.log(res);
            },"text")

        })
    </script>
</body>
</html>